Skip to content

fix: sync exp/#685#687

Merged
Finefinee merged 1 commit into
developfrom
fix/sync-exp/#685
Apr 15, 2026
Merged

fix: sync exp/#685#687
Finefinee merged 1 commit into
developfrom
fix/sync-exp/#685

Conversation

@hjbin-25

Copy link
Copy Markdown
Member

변경사항

  • 베타 시즌 exp 일괄 회수 후 users.total_exp와 user_exp_history 누적 합계가 불일치하는 데이터를 동기화하는 Flyway 마이그레이션 스크립트(V38) 추가
  • 각 유저의 total_exp를 user_exp_history.earn_exp 전체 합산값으로 보정 (음수 방지를 위해 GREATEST(0, ...) 적용)
  • 보정된 total_exp 기준으로 current_exp_tier 재계산

관련 이슈

Closes #685

추가 컨텍스트

  • SEASON_RESET 카테고리의 히스토리 항목(-currentExp)이 이미 기록되어 있어, SUM(earn_exp)가 실제 잔여 exp를 정확히 반영함
  • 히스토리 레코드가 전혀 없는 유저는 COALESCE(..., 0)으로 0 처리
  • exp 티어 기준: UNRANKED / BRONZE(1,000+) / SILVER(10,000+) / GOLD(30,000+) / DIAMOND(100,000+)

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a database migration script to synchronize user total experience points with their history and update experience tiers accordingly. The feedback suggests optimizing the migration by merging the two separate update statements into a single query using a join to improve performance and ensuring the updated_at timestamp is refreshed.

Comment thread src/main/resources/db/migration/V38__sync_user_exp_with_history.sql
@hjbin-25 hjbin-25 self-assigned this Apr 14, 2026
@hjbin-25 hjbin-25 added the bug 기능이 정상적으로 작동하지 않음 label Apr 14, 2026
@hjbin-25 hjbin-25 force-pushed the fix/sync-exp/#685 branch from 5fd3bcc to f57fc3b Compare April 14, 2026 23:57
@hjbin-25 hjbin-25 force-pushed the fix/sync-exp/#685 branch from f57fc3b to 0b86315 Compare April 15, 2026 07:00
@Finefinee Finefinee merged commit 3773f9e into develop Apr 15, 2026
1 check passed
@hjbin-25 hjbin-25 deleted the fix/sync-exp/#685 branch April 15, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 기능이 정상적으로 작동하지 않음

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants